<template>
  <div id="app">
    <router-view/>
    <div class="customer-list">
      <div class="imgbox" v-for="(item,index) in customerList" :key="index">
        <img class="avatar" :src="item" />
      </div>
    </div>
  </div>
</template>

<script>
import { POST } from './api/api.js'
export default {
  name: 'App',
  data () {
    return {
      customerList: []
    }
  },
  mounted () {
    this.getData()
  },
  methods: {
    getData () {
      let roomid = this.$route.query.roomid
      let data = {
        roomid: roomid
      }
      POST('fireworks/getroomusers',data).then(res => {
        console.log(res)
        if (res.error == 0) {
          this.customerList = res.data
        } else {
          console.log(res.msg)
        }
      })
    }
  }
}
</script>

<style scoped>
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}
.customer-list{
  position: fixed;
  bottom: 20px;
  left: 0;
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  width: 100%;
  z-index: 5
}
.imgbox{
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
}
.avatar{
  display: block;
  width: 100%;
  height: 100%;
}
</style>
